home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 001012_stiv@gsbs20.gs.uth.tmc.edu_Mon Sep 26 11:16:23 1994.msg < prev    next >
Internet Message Format  |  1994-10-11  |  5KB

  1. Received: from gsbs20.gs.uth.tmc.edu by cs.umb.edu with SMTP id AA08823
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Mon, 26 Sep 1994 17:16:27 -0400
  3. Received: by gsbs20.gs.uth.tmc.edu (4.1/SMI-4.1)
  4.     id AA06648; Mon, 26 Sep 94 16:16:24 CDT
  5. From: stiv@gsbs20.gs.uth.tmc.edu (David Stivers)
  6. Message-Id: <9409262116.AA06648@gsbs20.gs.uth.tmc.edu>
  7. Subject: Re: dvijlk bug report
  8. To: tex-k@cs.umb.edu
  9. Date: Mon, 26 Sep 1994 16:16:23 -0500 (CDT)
  10. X-Mailer: ELM [version 2.4 PL21]
  11. Content-Type: text
  12. Content-Length: 4352      
  13.  
  14. I'm on a Sun IPC, SunOS 4.1.3U3, using the Sun ANSI compiler.
  15.  
  16. I'm trying to get dviljk v2.1 to work.   I'm using a distribution that
  17. I ftp'd from shsu today. I downloaded it, extracted it, configured
  18. and compiled it.
  19.  
  20. I have latex installed using the kpathsea libraries (also from
  21. ftp.shsu.edu), and have texmf set up in the default format.
  22.  
  23. I'm sorry the following doesn't conform to the GNU bug report
  24. style; I don't have GCC.
  25.  
  26. A summary of the problem: kpse_magstep_fix is being called by
  27. ReadFontDef in dvi2xx. kpse_magstep_fix is not getting the values
  28. being passed to it, and croaks.
  29.  
  30. In particular, kpse_magstep_fix checks for a null address. If the
  31. address is not null, it tries to set the value at the address. The
  32. address is passed as null, but the supposedly null address is received
  33. as non-null, and hence dvilj2p crashes when trying to write to an
  34. invalid address.
  35.  
  36. I get the following diagnostics from dbx:
  37.  
  38. % dbx ./dvilj2p
  39. Reading symbolic information...
  40. Read 7161 symbols
  41. program terminated by signal SEGV (no mapping at the fault address)
  42.  
  43. (dbx) run --D -v ~/letter.dvi
  44. Running: ./dvilj2p --D -v /home/stiv/CV.dvi 
  45. got POST command
  46. now reading font defsMallocating 8768 Bytes)...
  47.  
  48. <I inserted a print statement to check the values of RESOLUTION and
  49. NULL>
  50.  
  51. RESOLUTION: 300 NULL: 0
  52.  
  53. <I inserted another to check if they were properly received>
  54. <Apparently they were not!>
  55.  
  56. bdpi: 0 m_ret: 300
  57.  
  58. signal SEGV (no mapping at the fault address) in kpse_magstep_fix at line 95 in file "kpathsea/magstep.c"
  59.    95       *m_ret = real_dpi == mdpi ? (m - 1) * sign : 0;
  60.  
  61. (dbx) whatis kpse_magstep_fix
  62. unsigned int kpse_magstep_fix(dpi, bdpi, m_ret)
  63. unsigned int dpi;
  64. unsigned int bdpi;
  65. int *m_ret;
  66.  
  67. (dbx) list 93,96
  68.    93     /* If requested, return the encoded magstep (the loop went one too far).  */
  69.    94     if (m_ret)
  70.    95       *m_ret = real_dpi == mdpi ? (m - 1) * sign : 0;
  71.    96  
  72.  
  73. (dbx) print m_ret
  74. m_ret = 0x12c
  75.  
  76. (dbx) print *m_ret
  77. bad data address
  78.  
  79. (dbx) print bdpi
  80. `magstep`kpse_magstep_fix`bdpi = 0
  81.  
  82. (dbx) print dpi
  83. `magstep`kpse_magstep_fix`dpi = 1081509888
  84.  
  85. (dbx) up
  86. Current function is ReadFontDef
  87.  3096         dpi = kpse_magstep_fix (tfontptr->font_mag / 5.0 + .5, RESOLUTION, NULL);
  88.  
  89. (dbx) print tfontptr->font_mag
  90. tfontptr->font_mag = 1800
  91.  
  92. < this is slightly different since I inserted the print statement.
  93.  
  94. The original code for this section is:
  95.  
  96.   3090        char *name;
  97.   3091        unsigned dpi
  98.   3092          = kpse_magstep_fix (tfontptr->font_mag / 5.0 + .5, RESOLUTION, 0
  99.   3093        tfontptr->font_mag = dpi * 5; /* save correct dpi */
  100.  
  101.  
  102. I've modified it as follows:
  103.  
  104.   3090        char *name;
  105.   3091        unsigned dpi;
  106.   3092          printf("RESOLUTION: %d NULL: %d\n", RESOLUTION,NULL);
  107.   3093        dpi = kpse_magstep_fix (tfontptr->font_mag / 5.0 + .5, RESOLUTION,
  108.   3094   NULL);
  109.   3095        tfontptr->font_mag = dpi * 5; /* save correct dpi */
  110.  
  111. What do you suggest that I do?
  112.  
  113. Thanks,
  114.  
  115. David Stivers
  116.  
  117. letter.tex is as follows:
  118.  
  119. ===============================================================================
  120. \documentstyle[12pt]{letter}
  121.  
  122.  
  123. \address{David N. Stivers \\ 818 Allston \#2 \\ Houston, Texas 77007 }
  124.  
  125. \signature{David N. Stivers}
  126. \begin{document}
  127. \begin{letter}{ blah \\ Foo Street\\ Grand, TX 75050}
  128. \opening{To whom it may concern:}
  129.  
  130.  
  131. \closing{Sincerely,}
  132. \end{letter}
  133. \end{document}
  134. ===============================================================================
  135.  
  136. letter.dvi is included below as a uu-encoded file. I have checked
  137. is on another system.
  138.  
  139. ===============================================================================
  140.  
  141. begin 644 letter.dvi
  142. M]P(!@Y+ '#L      ^@;(%1E6"!O=71P=70@,3DY-"XP.2XR-CHQ-C WBP  
  143. M  $                                               #_____H )F
  144. M  "-H/W!  "@ B8  (V@_H4/WXV-C9_A[-2-C9(!*J7K\PY8JU$+  P    ,
  145. M    !6-M<C$RN41AFJQR=FEDE@/JJ$XNDU-T:7:897)SCHZD#G__C8V2 2JE
  146. MZS@Q.)8#ZJA!;&QS=&]NDR,RCHZAC8V2 2JEZTAO=7-T;VXLE@/JJ%21_P56
  147. M97AA<Y,W-S P-XZ.GQ[S(8V-D@$JI>M397!T96V0K')BD%..97*6 ^JH,C8L
  148. MDS$Y.32.CHZ.CI]$.Y:-D31@I&)L86B.I Z  (V1-&"D1I'_!59OD%..;Y$#
  149. MZJA3=')E972.H8V1-&"D1W)A;F0LE@/JJ%18DS<U,#4PCI\G++.-D31@I%21
  150. M_P56;Y8#ZJAW:&]MDVETDVUAD*QR>9-C;VYC97)N.HZ?/0RAC8V?WQ$IC9( 
  151. MZN"D4VEN8V5R96QYD?\%5BR.GS_99HV2 .K@I$1AFJQR=FEDE@/JJ$XNDU-T
  152. M:7:897)SCHZ.CHZ,^    "H!@Y+ '#L      ^@"9@   :%@I  (  'S#EBK
  153. =40L #     P    %8VUR,3+Y   !S@+?W]_?W]\"
  154.  
  155. end